package pro.shushi.pamirs.meta.dsl.enumeration;

import pro.shushi.pamirs.meta.annotation.Errors;
import pro.shushi.pamirs.meta.common.enmu.ExpBaseEnum;
import pro.shushi.pamirs.meta.common.enmu.IEnum;

@Errors(displayName = "DSL错误枚举")
public enum DslExpEnumerate implements ExpBaseEnum, IEnum<Integer> {

    SYSTEM_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002000, "系统异常"),
    BASE_ACTION_PARAMS_IS_EMPTY_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002001, "动作入参为空"),
    BASE_ACTION_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002002, "动作执行异常"),
    BASE_COPY_DATA_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002003, "必须同为集合，才能进行数据拷贝"),
    BASE_END_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002004, "返回执行异常"),
    BASE_EXTD_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002005, "扩展点执行异常"),
    BASE_FUNC_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002006, "函数执行异常"),
    BASE_FOREACH_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002007, "循环执行异常"),
    BASE_FOREACH_PARAMS_IS_EMPTY_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002008, "循环执行异常"),
    BASE_FOREACH_PARAMS_IS_NOT_COLLECTION_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002009, "循环执行异常"),
    BASE_FOREACH_PARAMS_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002010, "循环执行异常"),
    BASE_TRANSFORM_NODE_ID_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002011, "逻辑转换异常"),
    BASE_TRANSFORM_NODE_IF_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002012, "条件转换异常"),
    BASE_TRANSFORM_NODE_IF_BRANCH_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002013, "条件转换异常"),
    BASE_TRANSFORM_NODE_FOR_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002014, "循环转换异常"),
    BASE_TRANSFORM_NODE_FOR_BRANCH_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002015, "循环转换异常"),
    BASE_TRANSFORM_NODE_TO_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002016, "跳转转换异常"),
    BASE_TRANSFORM_NODE_TO_CHECK_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002017, "跳转配置错误"),
    BASE_TRANSFORM_NODE_TO_IS_NOT_EXISTS_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002018, "跳转配置错误"),
    BASE_TRANSFORM_NODE_FOR_END_IS_NOT_EXISTS_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002019, "循环配置错误"),
    BASE_TRANSFORM_NODE_IF_NO_BRANCH_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002020, "条件转换配置错误"),
    BASE_TRANSFORM_NODE_TO_ID_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002021, "跳转配置错误"),
    BASE_TRANSFORM_NODE_TO_PRE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002022, "跳转配置错误"),
    BASE_MACHINE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002023, "状态机配置错误"),
    BASE_OBJ_PARAMS_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002024, "对象操作入参错误"),
    BASE_OBJ_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002025, "对象操作异常"),
    BASE_READ_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002026, "读操作异常"),
    BASE_READ_RSQL_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002027, "读操作异常"),
    BASE_START_HANDLE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002028, "开始节点异常"),
    BASE_UNSUPPORTED_ENCODING_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10002029, "不支持的编码格式");

    private final ERROR_TYPE type;

    private final int code;

    private final String msg;

    DslExpEnumerate(ERROR_TYPE type, int code, String msg) {
        this.type = type;
        this.code = code;
        this.msg = msg;
    }
}
